<?php

  session_start();
  include "config.php";
  include "ALcustomer.php";

  if(isset($_SESSION["user"]))
  {
    include "$header";
    include "$body";
?>

<div style="position:absolute; top:0px; left:1px; border:0;">
  <span class="prevPage">Change Customer Details:Search > </span>
  <span class="page">Record Details</span>
</div>

<?php

  include "$H_ccd";

  $old_title = $_SESSION["old_title"];
  $old_surname = $_SESSION["old_surname"];
  $old_given_name = $_SESSION["old_given_name"];
  $old_dob_day = $_SESSION["old_dob_day"];
  $old_dob_month = $_SESSION["old_dob_month"];
  switch ($old_dob_month)
  {
      case "01": $old_dob_monthn = "January"; break;
      case "02": $old_dob_monthn = "February"; break;
      case "03": $old_dob_monthn = "March"; break;
      case "04": $old_dob_monthn = "April"; break;
      case "05": $old_dob_monthn = "May"; break;
      case "06": $old_dob_monthn = "June"; break;
      case "07": $old_dob_monthn = "July"; break;
      case "08": $old_dob_monthn = "August"; break;
      case "09": $old_dob_monthn = "September"; break;
      case "10": $old_dob_monthn = "October"; break;
      case "11": $old_dob_monthn = "November"; break;
      case "12": $old_dob_monthn = "December"; break;
  }
  $old_dob_year = $_SESSION["old_dob_year"];
  $old_address = $_SESSION["old_address"];
  $old_post_code = $_SESSION["old_post_code"];
  $old_ph_area1 = $_SESSION["old_ph_area1"];
  $old_ph_no1 = $_SESSION["old_ph_no1"];
  $old_ph_area2 = $_SESSION["old_ph_area2"];
  $old_ph_no2 = $_SESSION["old_ph_no2"];
  $old_card_type1 = $_SESSION["old_card_type1"];
  $old_card_name1 = $_SESSION["old_card_name1"];
  $old_card_no1_1 = $_SESSION["old_card_no1_1"];
  $old_card_no1_2 = $_SESSION["old_card_no1_2"];
  $old_card_no1_3 = $_SESSION["old_card_no1_3"];
  $old_card_no1_4 = $_SESSION["old_card_no1_4"];
  $old_card_expiry_month1 = $_SESSION["old_card_expiry_month1"];
  switch ($old_card_expiry_month1)
  {
      case "01": $old_card_expiry_month1n = "January"; break;
      case "02": $old_card_expiry_month1n = "February"; break;
      case "03": $old_card_expiry_month1n = "March"; break;
      case "04": $old_card_expiry_month1n = "April"; break;
      case "05": $old_card_expiry_month1n = "May"; break;
      case "06": $old_card_expiry_month1n = "June"; break;
      case "07": $old_card_expiry_month1n = "July"; break;
      case "08": $old_card_expiry_month1n = "August"; break;
      case "09": $old_card_expiry_month1n = "September"; break;
      case "10": $old_card_expiry_month1n = "October"; break;
      case "11": $old_card_expiry_month1n = "November"; break;
      case "12": $old_card_expiry_month1n = "December"; break;
  }
  $old_card_expiry_year1 = "20".$_SESSION["old_card_expiry_year1"];
  $old_card_type2 = $_SESSION["old_card_type2"];
  $old_card_name2 = $_SESSION["old_card_name2"];
  $old_card_no2_1 = $_SESSION["old_card_no2_1"];
  $old_card_no2_2 = $_SESSION["old_card_no2_2"];
  $old_card_no2_3 = $_SESSION["old_card_no2_3"];
  $old_card_no2_4 = $_SESSION["old_card_no2_4"];
  $old_card_expiry_month2 = $_SESSION["old_card_expiry_month2"];
  switch ($old_card_expiry_month2)
  {
      case "01": $old_card_expiry_month2n = "January"; break;
      case "02": $old_card_expiry_month2n = "February"; break;
      case "03": $old_card_expiry_month2n = "March"; break;
      case "04": $old_card_expiry_month2n = "April"; break;
      case "05": $old_card_expiry_month2n = "May"; break;
      case "06": $old_card_expiry_month2n = "June"; break;
      case "07": $old_card_expiry_month2n = "July"; break;
      case "08": $old_card_expiry_month2n = "August"; break;
      case "09": $old_card_expiry_month2n = "September"; break;
      case "10": $old_card_expiry_month2n = "October"; break;
      case "11": $old_card_expiry_month2n = "November"; break;
      case "12": $old_card_expiry_month2n = "December"; break;
  }
  $old_card_expiry_year2 = "20".$_SESSION["old_card_expiry_year2"];
  
  if(isset($_SESSION["new_title"]))
  {
    $new_title = ltrim($_SESSION["new_title"]);
    $new_surname = ltrim($_SESSION["new_surname"]);
    $new_given_name = ltrim($_SESSION["new_given_name"]);
    $new_dob_day = ltrim($_SESSION["new_dob_day"]);
    $new_dob_month = ltrim($_SESSION["new_dob_month"]);
    $new_dob_year = ltrim($_SESSION["new_dob_year"]);
    $new_address = ltrim($_SESSION["new_address"]);
    $new_post_code = ltrim($_SESSION["new_post_code"]);
    $new_ph_area1 = ltrim($_SESSION["new_ph_area1"]);
    $new_ph_no1 = ltrim($_SESSION["new_ph_no1"]);
    $new_ph_area2 = ltrim($_SESSION["new_ph_area2"]);
    $new_ph_no2 = ltrim($_SESSION["new_ph_no2"]);
    $new_card_type1 = ltrim($_SESSION["new_card_type1"]);
    $new_card_name1 = ltrim($_SESSION["new_card_name1"]);
    $new_card_no1_1 = ltrim($_SESSION["new_card_no1_1"]);
    $new_card_no1_2 = ltrim($_SESSION["new_card_no1_2"]);
    $new_card_no1_3 = ltrim($_SESSION["new_card_no1_3"]);
    $new_card_no1_4 = ltrim($_SESSION["new_card_no1_4"]);
    $new_card_expiry_month1 = ltrim($_SESSION["new_card_expiry_month1"]);
    $new_card_expiry_year1 = ltrim($_SESSION["new_card_expiry_year1"]);
    $new_card_type2 = ltrim($_SESSION["new_card_type2"]);
    $new_card_name2 = ltrim($_SESSION["new_card_name2"]);
    $new_card_no2_1 = ltrim($_SESSION["new_card_no2_1"]);
    $new_card_no2_2 = ltrim($_SESSION["new_card_no2_2"]);
    $new_card_no2_3 = ltrim($_SESSION["new_card_no2_3"]);
    $new_card_no2_4 = ltrim($_SESSION["new_card_no2_4"]);
    $new_card_expiry_month2 = ltrim($_SESSION["new_card_expiry_month2"]);
    $new_card_expiry_year2 = ltrim($_SESSION["new_card_expiry_year2"]);

    unset($_SESSION["new_title"]);
    unset($_SESSION["new_surname"]);
    unset($_SESSION["new_given_name"]);
    unset($_SESSION["new_dob_day"]);
    unset($_SESSION["new_dob_month"]);
    unset($_SESSION["new_dob_year"]);
    unset($_SESSION["new_address"]);
    unset($_SESSION["new_pcode"]);
    unset($_SESSION["new_ph_area1"]);
    unset($_SESSION["new_ph_no1"]);
    unset($_SESSION["new_ph_area2"]);
    unset($_SESSION["new_ph_no2"]);
    unset($_SESSION["new_card_type1"]);
    unset($_SESSION["new_card_name1"]);
    unset($_SESSION["new_card_no1_1"]);
    unset($_SESSION["new_card_no1_2"]);
    unset($_SESSION["new_card_no1_3"]);
    unset($_SESSION["new_card_no1_4"]);
    unset($_SESSION["new_card_expiry_month1"]);
    unset($_SESSION["new_card_expiry_year1"]);
    unset($_SESSION["new_card_type2"]);
    unset($_SESSION["new_card_name2"]);
    unset($_SESSION["new_card_no2_1"]);
    unset($_SESSION["new_card_no2_2"]);
    unset($_SESSION["new_card_no2_3"]);
    unset($_SESSION["new_card_no2_4"]);
    unset($_SESSION["new_card_expiry_month2"]);
    unset($_SESSION["new_card_expiry_year2"]);
  }

  if(isset($_POST["submit"]))
  {
       $new_title = ltrim($_POST["new_title"]);
       $new_surname = ltrim($_POST["new_surname"]);
       $new_given_name = ltrim($_POST["new_given_name"]);
       $new_dob_day = ltrim($_POST["new_dob_day"]);
       $new_dob_month = ltrim($_POST["new_dob_month"]);
       $new_dob_year = ltrim($_POST["new_dob_year"]);
       $new_address = ltrim($_POST["new_address"]);
       $new_post_code = ltrim($_POST["new_post_code"]);
       $new_ph_area1 = ltrim($_POST["new_ph_area1"]);
       $new_ph_no1 = ltrim($_POST["new_ph_no1"]);
       $new_ph_area2 = ltrim($_POST["new_ph_area2"]);
       $new_ph_no2 = ltrim($_POST["new_ph_no2"]);
       $new_card_type1 = ltrim($_POST["new_card_type1"]);
       $new_card_name1 = ltrim($_POST["new_card_name1"]);
       $new_card_no1_1 = ltrim($_POST["new_card_no1_1"]);
       $new_card_no1_2 = ltrim($_POST["new_card_no1_2"]);
       $new_card_no1_3 = ltrim($_POST["new_card_no1_3"]);
       $new_card_no1_4 = ltrim($_POST["new_card_no1_4"]);
       $new_card_expiry_month1 = ltrim($_POST["new_card_expiry_month1"]);
       $new_card_expiry_year1 = ltrim($_POST["new_card_expiry_year1"]);
       $new_card_type2 = ltrim($_POST["new_card_type2"]);
       $new_card_name2 = ltrim($_POST["new_card_name2"]);
       $new_card_no2_1 = ltrim($_POST["new_card_no2_1"]);
       $new_card_no2_2 = ltrim($_POST["new_card_no2_2"]);
       $new_card_no2_3 = ltrim($_POST["new_card_no2_3"]);
       $new_card_no2_4 = ltrim($_POST["new_card_no2_4"]);
       $new_card_expiry_month2 = ltrim($_POST["new_card_expiry_month2"]);
       $new_card_expiry_year2 = ltrim($_POST["new_card_expiry_year2"]);

       if(validChangeDetails($new_title, $new_surname, $new_given_name, $new_dob_day, $new_dob_month, $new_dob_year, $new_address, $new_post_code, $new_ph_area1, $new_ph_no1, $new_ph_area2, $new_ph_no2, $new_card_type1, $new_card_name1, $new_card_no1_1, $new_card_no1_2, $new_card_no1_3, $new_card_no1_4, $new_card_expiry_month1, $new_card_expiry_year1, $new_card_type2, $new_card_name2, $new_card_no2_1, $new_card_no2_2, $new_card_no2_3, $new_card_no2_4, $new_card_expiry_month2, $new_card_expiry_year2))
       {
           $_SESSION["new_title"] = $new_title;
           $_SESSION["new_surname"] = $new_surname;
           $_SESSION["new_given_name"] = $new_given_name;
           $_SESSION["new_dob_day"] = $new_dob_day;
           $_SESSION["new_dob_month"] = $new_dob_month;
           $_SESSION["new_dob_year"] = $new_dob_year;
           $_SESSION["new_address"] = $new_address;
           $_SESSION["new_post_code"] = $new_post_code;
           $_SESSION["new_ph_area1"] = $new_ph_area1;
           $_SESSION["new_ph_no1"] = $new_ph_no1;
           $_SESSION["new_ph_area2"] = $new_ph_area2;
           $_SESSION["new_ph_no2"] = $new_ph_no2;
           $_SESSION["new_card_type1"] = $new_card_type1;
           $_SESSION["new_card_name1"] = $new_card_name1;
           $_SESSION["new_card_no1_1"] = $new_card_no1_1;
           $_SESSION["new_card_no1_2"] = $new_card_no1_2;
           $_SESSION["new_card_no1_3"] = $new_card_no1_3;
           $_SESSION["new_card_no1_4"] = $new_card_no1_4;
           $_SESSION["new_card_expiry_month1"] = $new_card_expiry_month1;
           $_SESSION["new_card_expiry_year1"] = $new_card_expiry_year1;
           $_SESSION["new_card_type2"] = $new_card_type2;
           $_SESSION["new_card_name2"] = $new_card_name2;
           $_SESSION["new_card_no2_1"] = $new_card_no2_1;
           $_SESSION["new_card_no2_2"] = $new_card_no2_2;
           $_SESSION["new_card_no2_3"] = $new_card_no2_3;
           $_SESSION["new_card_no2_4"] = $new_card_no2_4;
           $_SESSION["new_card_expiry_month2"] = $new_card_expiry_month2;
           $_SESSION["new_card_expiry_year2"] = $new_card_expiry_year2;

           echo "<SCRIPT language='Javascript'>";
           echo "    window.location.href = 'changeCustomerDetails_2confirmDetails.php';";
           echo "</SCRIPT>";
       }
  }





  echo "Customer No. <b>".$_SESSION["customerID"]."</b><p>";

?>

<font color="red">*</font><font face="Century Gothic" style="font-size:12px"> = mandatory field</font>
<p>

<form name="customer" action="" method="post">
      <table class="customer" width="99%" border="0" cellpadding="2" cellspacing="2">
             <tr>
                 <td align="center">
                     <b>Current details</b>
                 </td>
                 <td align="center">
                     <b>Enter new details</b>
                 </td>
             </tr>
             <tr>
                 <td>
                     <table class="oldCustomer">
                            <tr>
                                <td width="30%" align="right">
                                    <span class="style3"><b>Title</b><font color="red">*</font></span>
                                </td>
                                <td width="*" align="left">
                                    <input class="oldCustomer" name="old_title" type=text style="border:1px solid #000000; width:50px; color:blue" readonly value="<?php echo $old_title; ?>">
                                </td>
                            </tr>
                            <tr>
                                <td width="36%" align="right">
                                    <span class="style3"><b>Surname</b><font color="red">*</font></span>
                                </td>
                                <td width="64%" align="left">
                                    <input class="oldCustomer" name="old_surname" type=text style="border:1px solid #000000; width:200px; color:blue" readonly value="<?php echo $old_surname; ?>"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Given Name</b><font color="red">*</font></span>
                                </td>
                                <td width="64%" align="left">
                                    <input class="oldCustomer" name="old_given_name" type=text style="border:1px solid #000000; width:200px; color:blue" readonly value="<?php echo $old_given_name; ?>"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Date of Birth</b><font color="red">*</font></span>
                                </td>
                                <td width="64%" align="left">
                                    <input class="oldCustomer" name="old_dob_day" style="border:1px solid #000000; width:50px; color:blue" readonly value="<?php echo $old_dob_day; ?>"/>
                                    <input class="oldCustomer" name="old_dob_month" style="border:1px solid #000000; width:100px; color:blue" readonly value="<?php echo $old_dob_monthn; ?>"/>
                                    <input class="oldCustomer" name="old_dob_year"  style="border:1px solid #000000; width:75px; color:blue" readonly value="<?php echo $old_dob_year; ?>"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Address</b><font color="red">*</font></span>
                                </td>
                                <td width="64%" align="left">
                                    <input type=text class="oldCustomer" name="old_address" style="border:1px solid #000000; width:200px; color:blue" readonly value="<?php echo $old_address; ?>"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Post Code<font color="red">*</font></span>
                                </td>
                                <td width="64%" align="left">
                                    <input class="oldCustomer" name="old_post_code" type=text style="border:1px solid #000000; width:50px; color:blue" readonly value="<?php echo $old_post_code; ?>"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Phone (H)/(M)</b><font color="red">*</font><br/><b>(W)</b></span>
                                </td>
                                <td width="64%" align="left">
                                    ( <input class="oldCustomer" name="old_ph_area1" type=text style="border:1px solid #000000; width:20px; color:blue" readonly value="<?php echo $old_ph_area1; ?>"/> )
                                    <input class="oldCustomer" name="old_ph_no1" type=text style="border:1px solid #000000; width:155px; color:blue" readonly value="<?php echo $old_ph_no1; ?>"/><br />
                                    ( <input class="oldCustomer" name="old_ph_area2" type=text style="border:1px solid #000000; width:20px; color:blue" readonly value="<?php echo $old_ph_area2; ?>"/> )
                                    <input class="oldCustomer" name="old_ph_no2" type=text style="border:1px solid #000000; width:155px; color:blue" readonly value="<?php echo $old_ph_no2; ?>"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    <span class="style3"><b>Preferred Credit Card</b><font color="red">*</font></span>
                                </td>
                                <td width="64%" align="left">
                                    <table style="border:1px solid #000000">
                                           <tr>
                                               <td>
                                                   Card Type: &nbsp; <input class="oldCustomer" name="old_card_type1" style="border:1px solid #000000; width:100px; color:blue" readonly value="<?php echo $old_card_type1; ?>"/>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Card Name: &nbsp; <input class="oldCustomer" name="old_card_name1" type="text" style="border:1px solid black; width:150px; color:blue" readonly value="<?php echo $old_card_name1; ?>"/>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Card Number: &nbsp; <input class="oldCustomer" name="old_card_no1_1" type="text" style="width:40px; color:blue" readonly value="<?php echo $old_card_no1_1; ?>"/>
                                                   <input class="oldCustomer" name="old_card_no1_2" type="text" style="width:40px; color:blue" readonly value="<?php echo $old_card_no1_2; ?>">
                                                   <input class="oldCustomer" name="old_card_no1_3" type="text" style="width:40px; color:blue" readonly value="<?php echo $old_card_no1_3; ?>">
                                                   <input class="oldCustomer" name="old_card_no1_4" type="text" style="width:40px; color:blue" readonly value="<?php echo $old_card_no1_4; ?>">
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Expiry Date: &nbsp; <input class="oldCustomer" name="old_card_expiry_month1" style="border:1px solid #000000; width:100px; color:blue" readonly value="<?php echo $old_card_expiry_month1n; ?>"/>
                                                   <input class="oldCustomer" name="old_card_expiry_year1" style="border:1px solid #000000; width:75px; color:blue" readonly value="<?php echo $old_card_expiry_year1; ?>"/>
                                               </td>
                                           </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    <span class="style3"><b>Alternate Credit Card</b></span>
                                </td>
                                <td width="64%" align="left">
                                    <table style="border:1px solid #000000">
                                           <tr>
                                               <td>
                                                   Card Type: &nbsp; <input class="oldCustomer" name="old_card_type2" style="border:1px solid #000000; width:100px; color:blue" readonly value="<?php echo $old_card_type2; ?>"/>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Card Name: &nbsp; <input class="oldCustomer" name="old_card_name2" type="text" style="border:1px solid black; width:150px; color:blue" readonly value="<?php echo $old_card_name2; ?>">
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Card Number: &nbsp; <input class="oldCustomer" name="old_card_no2_1" type="text" style="width:40px; color:blue" readonly value="<?php echo $old_card_no2_1; ?>">
                                                   <input class="oldCustomer" name="old_card_no2_2" type="text" style="width:40px; color:blue" readonly value="<?php echo $old_card_no2_2; ?>">
                                                   <input class="oldCustomer" name="old_card_no2_3" type="text" style="width:40px; color:blue" readonly value="<?php echo $old_card_no2_3; ?>">
                                                   <input class="oldCustomer" name="old_card_no2_4" type="text" style="width:40px; color:blue" readonly value="<?php echo $old_card_no2_4; ?>">
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Expiry Date: &nbsp; <input class="oldCustomer" name="old_card_expiry_month2" style="border:1px solid #000000; width:100px; color:blue" readonly value="<?php echo $old_card_expiry_month2n; ?>"/>
                                                   <input class="oldCustomer" name="old_card_expiry_year2" style="border:1px solid #000000; width:75px; color:blue" readonly value="<?php echo $old_card_expiry_year2; ?>"/>
                                               </td>
                                           </tr>
                                    </table>
                                </td>
                            </tr>
                     </table>
                 </td>


                 <td>
                     <table class="customer" width="90%" border="0" cellpadding="2" cellspacing="2">
                            <tr>
                                <td width="30%" align="right">
                                    <span class="style3"><b>Title</b></span>
                                </td>
                                <td width="*" align="left">
                                    <select class="newCustomer" name="new_title" style="font-family: 'Century Gothic'; font-size:12px;color:black; width:100px">
                                            <option value="">No change</option>
                                            <option value="0">Mr</option>
                                            <option value="1">Miss</option>
                                            <option value="2">Mrs</option>
                                            <option value="3">Ms</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td width="36%" align="right">
                                    <span class="style3"><b>Surname</b></span>
                                </td>
                                <td width="64%" align="left">
                                    <input class="newCustomer" name="new_surname" type=text style="border:1px solid #000000; width:200px"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Given Name</b></span>
                                </td>
                                <td width="64%" align="left">
                                    <input class="newCustomer" name="new_given_name" type=text style="border:1px solid #000000; width:200px"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Date of Birth</b></span>
                                </td>
                                <td width="64%" align="left">
                                    <select class="newCustomer" name="new_dob_day" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                            <option value="">No change</option>
                                            <option value ="01">1</option>
                                            <option value ="02">2</option>
                                            <option value ="03">3</option>
                                            <option value ="04">4</option>
                                            <option value ="05">5</option>
                                            <option value ="06">6</option>
                                            <option value ="07">7</option>
                                            <option value ="08">8</option>
                                            <option value ="09">9</option>
                                            <option value ="10">10</option>
                                            <option value ="11">11</option>
                                            <option value ="12">12</option>
                                            <option value ="13">13</option>
                                            <option value ="14">14</option>
                                            <option value ="15">15</option>
                                            <option value ="16">16</option>
                                            <option value ="17">17</option>
                                            <option value ="18">18</option>
                                            <option value ="19">19</option>
                                            <option value ="20">20</option>
                                            <option value ="21">21</option>
                                            <option value ="22">22</option>
                                            <option value ="23">23</option>
                                            <option value ="24">24</option>
                                            <option value ="25">25</option>
                                            <option value ="26">26</option>
                                            <option value ="27">27</option>
                                            <option value ="28">28</option>
                                            <option value ="29">29</option>
                                            <option value ="30">30</option>
                                            <option value ="31">31</option>
                                    </select>
                                    <select class="newCustomer" name="new_dob_month" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                           <option value="">No change</option>
                                           <option value ="01">January</option>
                                           <option value ="02">February</option>
                                           <option value ="03">March</option>
                                           <option value ="04">April</option>
                                           <option value ="05">May</option>
                                           <option value ="06">June</option>
                                           <option value ="07">July</option>
                                           <option value ="08">August</option>
                                           <option value ="09">September</option>
                                           <option value ="10">October</option>
                                           <option value ="11">November</option>
                                           <option value ="12">December</option>
                                    </select>
                                    <select class="newCustomer" name="new_dob_year" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                            <option value="">No change</option>
                                            <option value ="1900">1900</option>
                                            <option value ="1901">1901</option>
                                            <option value ="1902">1902</option>
                                            <option value ="1903">1903</option>
                                            <option value ="1904">1904</option>
                                            <option value ="1905">1905</option>
                                            <option value ="1906">1906</option>
                                            <option value ="1907">1907</option>
                                            <option value ="1908">1908</option>
                                            <option value ="1909">1909</option>
                                            <option value ="1910">1910</option>
                                            <option value ="1911">1911</option>
                                            <option value ="1912">1912</option>
                                            <option value ="1913">1913</option>
                                            <option value ="1914">1914</option>
                                            <option value ="1915">1915</option>
                                            <option value ="1916">1916</option>
                                            <option value ="1917">1917</option>
                                            <option value ="1918">1918</option>
                                            <option value ="1919">1919</option>
                                            <option value ="1920">1920</option>
                                            <option value ="1921">1921</option>
                                            <option value ="1922">1922</option>
                                            <option value ="1923">1923</option>
                                            <option value ="1924">1924</option>
                                            <option value ="1925">1925</option>
                                            <option value ="1926">1926</option>
                                            <option value ="1927">1927</option>
                                            <option value ="1928">1928</option>
                                            <option value ="1929">1929</option>
                                            <option value ="1930">1930</option>
                                            <option value ="1931">1931</option>
                                            <option value ="1932">1932</option>
                                            <option value ="1933">1933</option>
                                            <option value ="1934">1934</option>
                                            <option value ="1935">1935</option>
                                            <option value ="1936">1936</option>
                                            <option value ="1937">1937</option>
                                            <option value ="1938">1938</option>
                                            <option value ="1939">1939</option>
                                            <option value ="1940">1940</option>
                                            <option value ="1941">1941</option>
                                            <option value ="1942">1942</option>
                                            <option value ="1943">1943</option>
                                            <option value ="1944">1944</option>
                                            <option value ="1945">1945</option>
                                            <option value ="1946">1946</option>
                                            <option value ="1947">1947</option>
                                            <option value ="1948">1948</option>
                                            <option value ="1949">1949</option>
                                            <option value ="1940">1950</option>
                                            <option value ="1951">1951</option>
                                            <option value ="1952">1952</option>
                                            <option value ="1953">1953</option>
                                            <option value ="1954">1954</option>
                                            <option value ="1955">1955</option>
                                            <option value ="1956">1956</option>
                                            <option value ="1957">1957</option>
                                            <option value ="1958">1958</option>
                                            <option value ="1959">1959</option>
                                            <option value ="1960">1960</option>
                                            <option value ="1961">1961</option>
                                            <option value ="1962">1962</option>
                                            <option value ="1963">1963</option>
                                            <option value ="1964">1964</option>
                                            <option value ="1965">1965</option>
                                            <option value ="1966">1966</option>
                                            <option value ="1967">1967</option>
                                            <option value ="1968">1968</option>
                                            <option value ="1969">1969</option>
                                            <option value ="1970">1970</option>
                                            <option value ="1971">1971</option>
                                            <option value ="1972">1972</option>
                                            <option value ="1973">1973</option>
                                            <option value ="1974">1974</option>
                                            <option value ="1975">1975</option>
                                            <option value ="1976">1976</option>
                                            <option value ="1977">1977</option>
                                            <option value ="1978">1978</option>
                                            <option value ="1979">1979</option>
                                            <option value ="1980">1980</option>
                                            <option value ="1981">1981</option>
                                            <option value ="1982">1982</option>
                                            <option value ="1983">1983</option>
                                            <option value ="1984">1984</option>
                                            <option value ="1985">1985</option>
                                            <option value ="1986">1986</option>
                                            <option value ="1987">1987</option>
                                            <option value ="1988">1988</option>
                                            <option value ="1989">1989</option>
                                            <option value ="1990">1990</option>
                                            <option value ="1991">1991</option>
                                            <option value ="1992">1992</option>
                                            <option value ="1993">1993</option>
                                            <option value ="1994">1994</option>
                                            <option value ="1995">1995</option>
                                            <option value ="1996">1996</option>
                                            <option value ="1997">1997</option>
                                            <option value ="1998">1998</option>
                                            <option value ="1999">1999</option>
                                            <option value ="2000">2000</option>
                                            <option value ="2001">2001</option>
                                            <option value ="2002">2002</option>
                                            <option value ="2003">2003</option>
                                            <option value ="2004">2004</option>
                                            <option value ="2005">2005</option>
                                            <option value ="2006">2006</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Address</b></span>
                                </td>
                                <td width="64%" align="left">
                                    <input type=text class="newCustomer" name="new_address" style="border:1px solid #000000; width:200px"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Post Code</span>
                                </td>
                                <td width="64%" align="left">
                                    <input class="newCustomer" name="new_post_code" type=text style="border:1px solid #000000; width:50px"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <span class="style3"><b>Phone (H)/(M)</b><br/><b>(W)</b></span>
                                </td>
                                <td width="64%" align="left">
                                    ( <input class="newCustomer" name="new_ph_area1" type=text style="border:1px solid #000000; width:20px"/> )
                                    <input class="newCustomer" name="new_ph_no1" type=text style="border:1px solid #000000; width:155px"/><br />
                                    ( <input class="newCustomer" name="new_ph_area2" type=text style="border:1px solid #000000; width:20px" /> )
                                    <input class="newCustomer" name="new_ph_no2" type=text style="border:1px solid #000000; width:155px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    <span class="style3"><b>Preferred Credit Card</b></span>
                                </td>
                                <td width="64%" align="left">
                                    <table style="border:1px solid #000000">
                                           <tr>
                                               <td>
                                                   Card Type: &nbsp; <select class="newCustomer" name="new_card_type1" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                                        <option value="">No change</option>
                                                        <option value="0">Mastercard</option>
                                                        <option value="1">Visa</option>
                                                        <option value="2">Amex</option>
                                                        <option value="3">Diners Club</option>
                                                   </select>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Card Name: &nbsp; <input class="newCustomer" name="new_card_name1" type="text" style="border:1px solid black; width:150px">
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Card Number: <br> <input class="newCustomer" name="new_card_no1_1" type="text" style="width:40px;">
                                                   <input class="newCustomer" name="new_card_no1_2" type="text" style="width:40px;">
                                                   <input class="newCustomer" name="new_card_no1_3" type="text" style="width:40px;">
                                                   <input class="newCustomer" name="new_card_no1_4" type="text" style="width:40px;">
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Expiry Date: &nbsp; <select class="newCustomer" name="new_card_expiry_month1" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                                          <option value="">No change</option>
                                                          <option value ="01">January</option>
                                                          <option value ="02">February</option>
                                                          <option value ="03">March</option>
                                                          <option value ="04">April</option>
                                                          <option value ="05">May</option>
                                                          <option value ="06">June</option>
                                                          <option value ="07">July</option>
                                                          <option value ="08">August</option>
                                                          <option value ="09">September</option>
                                                          <option value ="10">October</option>
                                                          <option value ="11">November</option>
                                                          <option value ="12">December</option>
                                                   </select>
                                                   <select class="newCustomer" name="new_card_expiry_year1" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                                           <option value="">No change</option>
                                                           <option value ="2000">2000</option>
                                                           <option value ="2001">2001</option>
                                                           <option value ="2002">2002</option>
                                                           <option value ="2003">2003</option>
                                                           <option value ="2004">2004</option>
                                                           <option value ="2005">2005</option>
                                                           <option value ="2006">2006</option>
                                                           <option value ="2007">2007</option>
                                                           <option value ="2008">2008</option>
                                                           <option value ="2009">2009</option>
                                                           <option value ="2010">2010</option>
                                                           <option value ="2011">2011</option>
                                                           <option value ="2012">2012</option>
                                                           <option value ="2013">2013</option>
                                                           <option value ="2014">2014</option>
                                                           <option value ="2015">2015</option>
                                                           <option value ="2016">2016</option>
                                                           <option value ="2017">2017</option>
                                                           <option value ="2018">2018</option>
                                                           <option value ="2019">2019</option>
                                                           <option value ="2020">2020</option>
                                                   </select>
                                               </td>
                                           </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    <span class="style3"><b>Alternate Credit Card</b></span>
                                </td>
                                <td width="64%" align="left">
                                    <table style="border:1px solid #000000">
                                           <tr>
                                               <td>
                                                   Card Type: &nbsp; <select class="newCustomer" name="new_card_type2" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                                        <option value="">No change</option>
                                                        <option value="0">Mastercard</option>
                                                        <option value="1">Visa</option>
                                                        <option value="2">Amex</option>
                                                        <option value="3">Diners Club</option>
                                                   </select>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Card Name: &nbsp; <input class="newCustomer" name="new_card_name2" type="text" style="border:1px solid black; width:150px">
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Card Number: <br> <input class="newCustomer" name="new_card_no2_1" type="text" style="width:40px;">
                                                   <input class="newCustomer" name="new_card_no2_2" type="text" style="width:40px;">
                                                   <input class="newCustomer" name="new_card_no2_3" type="text" style="width:40px;">
                                                   <input class="newCustomer" name="new_card_no2_4" type="text" style="width:40px;">
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   Expiry Date: &nbsp; <select class="newCustomer" name="new_card_expiry_month2" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                                          <option value="">No change</option>
                                                          <option value ="01">January</option>
                                                          <option value ="02">February</option>
                                                          <option value ="03">March</option>
                                                          <option value ="04">April</option>
                                                          <option value ="05">May</option>
                                                          <option value ="06">June</option>
                                                          <option value ="07">July</option>
                                                          <option value ="08">August</option>
                                                          <option value ="09">September</option>
                                                          <option value ="10">October</option>
                                                          <option value ="11">November</option>
                                                          <option value ="12">December</option>
                                                   </select>
                                                   <select class="newCustomer" name="new_card_expiry_year2" style="font-family:'Century Gothic'; font-size:12px; width:100px">
                                                           <option value="">No change</option>
                                                           <option value ="2000">2000</option>
                                                           <option value ="2001">2001</option>
                                                           <option value ="2002">2002</option>
                                                           <option value ="2003">2003</option>
                                                           <option value ="2004">2004</option>
                                                           <option value ="2005">2005</option>
                                                           <option value ="2006">2006</option>
                                                           <option value ="2007">2007</option>
                                                           <option value ="2008">2008</option>
                                                           <option value ="2009">2009</option>
                                                           <option value ="2010">2010</option>
                                                           <option value ="2011">2011</option>
                                                           <option value ="2012">2012</option>
                                                           <option value ="2013">2013</option>
                                                           <option value ="2014">2014</option>
                                                           <option value ="2015">2015</option>
                                                           <option value ="2016">2016</option>
                                                           <option value ="2017">2017</option>
                                                           <option value ="2018">2018</option>
                                                           <option value ="2019">2019</option>
                                                           <option value ="2020">2020</option>
                                                   </select>
                                               </td>
                                           </tr>
                                    </table>
                                </td>
                            </tr>
                     </table>
                 </td>
             </tr>
      </table>
      <input name="submit" type=submit style="font-family:'Century Gothic'; font-size:12px; color:#000000; border:1px solid #000000; width:70px; background-color:#FFFFFF" value="Submit"/>
</form>

</BODY>

<?php

  include "$footer";

  echo "<SCRIPT language='Javascript'>";
  if($new_title != "")
  {
      echo "  customer.new_title.selectedIndex=".($new_title + 1).";";
  }
  echo "  customer.new_surname.value='".$new_surname."';";
  echo "  customer.new_given_name.value='".$new_given_name."';";
  if($new_dob_day != "")
  {
      echo "  customer.new_dob_day.selectedIndex=".($new_dob_day).";";
  }
  if($new_dob_month != "")
  {
      echo "  customer.new_dob_month.selectedIndex=".($new_dob_month).";";
  }
  if($new_dob_year != "")
  {
      echo "  customer.new_dob_year.selectedIndex=".($new_dob_year - 1899).";";
  }
  echo "  customer.new_address.value='".$new_address."';";
  echo "  customer.new_post_code.value='".$new_post_code."';";
  echo "  customer.new_ph_area1.value='".$new_ph_area1."';";
  echo "  customer.new_ph_no1.value='".$new_ph_no1."';";
  echo "  customer.new_ph_area2.value='".$new_ph_area2."';";
  echo "  customer.new_ph_no2.value='".$new_ph_no2."';";
  if($new_card_type1 != "")
  {
      echo "  customer.new_card_type1.selectedIndex=".($new_card_type1 + 1).";";
  }
  echo "  customer.new_card_name1.value='".$new_card_name1."';";
  echo "  customer.new_card_no1_1.value='".$new_card_no1_1."';";
  echo "  customer.new_card_no1_2.value='".$new_card_no1_2."';";
  echo "  customer.new_card_no1_3.value='".$new_card_no1_3."';";
  echo "  customer.new_card_no1_4.value='".$new_card_no1_4."';";
  if($new_card_expiry_month1 != "")
  {
      echo "  customer.new_card_expiry_month1.selectedIndex='".($new_card_expiry_month1)."';";
  }
  if($new_card_expiry_year1 != "")
  {
      echo "  customer.new_card_expiry_year1.selectedIndex='".($new_card_expiry_year1 - 1999)."';";
  }
  if($new_card_type2 != "")
  {
      echo "  customer.new_card_type2.selectedIndex=".($new_card_type2 + 1).";";
  }
  echo "  customer.new_card_name2.value='".$new_card_name2."';";
  echo "  customer.new_card_no2_1.value='".$new_card_no2_1."';";
  echo "  customer.new_card_no2_2.value='".$new_card_no2_2."';";
  echo "  customer.new_card_no2_3.value='".$new_card_no2_3."';";
  echo "  customer.new_card_no2_4.value='".$new_card_no2_4."';";
  if($new_card_expiry_month2 != "")
  {
      echo "  customer.new_card_expiry_month2.selectedIndex='".($new_card_expiry_month2)."';";
  }
  if($new_card_expiry_year2 != "")
  {
      echo "  customer.new_card_expiry_year2.selectedIndex='".($new_card_expiry_year2 - 1999)."';";
  }
  echo "</SCRIPT>";

  }

?>